﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Master.Master" Inherits="System.Web.Mvc.ViewPage<SCS.Core.Models.Collection.AssignPagePermissionCollection>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AssignPage
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript" src="/Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'></script>
<script type="text/javascript">
    var $s = jQuery.noConflict();
    </script>
	<script src="/Scripts/jquery.cookie.js" type="text/javascript"></script>
	<script src="/Scripts/jquery.treeview.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Scripts/demo.js"></script>

    <link rel="stylesheet" type="text/css" href="/Content/jquery.treeview.css" />
    <script type="text/javascript" src="/ThemeExtends/AdminSkin/js/jquery.flot.js"></script>
    <script type="text/javascript" src="/ThemeExtends/AdminSkin/js/jquery.flot.stack.js"></script>	
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/jquery-ui-1.8.13.custom.css"/>
    <link rel="stylesheet" type="text/css" href="/Content/smoothness-1.8.13/ui.dropdownchecklist.themeroller.css"/>
    <script type="text/javascript" src="/Scripts/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui-1.8.13.custom.min.js"></script>
    <script type="text/javascript" src="/Scripts/ui.dropdownchecklist-1.4-min.js"></script>
    <script src="/Scripts/jquery.selectboxes.min.js" type="text/javascript"></script>
    <%--Validator--%>
    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("SaveAssignPage", "User", FormMethod.Post, new {id="sendFileForm" ,proid = "sendFileForm", enctype = "multipart/form-data" }))
            {%>   
    <div class="clear"></div>
       
        <div class="box ">
		    <h2 class="box-header">Assign Page</h2>
		    <div class="box-content" >
                 <%=ViewData["listPagePermission"]%>        
                 <%=Html.HiddenFor(m => m.arrPageID)%>
                 <%=Html.Hidden("PerID", ViewData["PerID"])%>        
                 <input type="submit" value="Save" class="button themed"/>
        </div>
    </div>  
      
    <% } %>
    <script type="text/javascript">
        function checkUncheck(theElement) {
            var arr = "";
            var theForm = theElement.form, z = 0;
            for (z = 0; z < theForm.length; z++) {
                if (theForm[z].type == 'checkbox') {
                    //theForm[z].checked = theElement.checked;
                    if (theForm[z].checked == true) {
                        arr += theForm[z].id.toString() + ",";
                    }
                }
            }

            if (document.all || document.getElementById) {
                document.getElementById('arrPageID').value = arr;
            }
            else {
                document.getElementById('arrPageID').setAttribute("value", arr);
            }
        }

</script>
</asp:Content>
